var service_transportCloudService = {
	getPortType: function(){
		var self = this;
		var resPort = [{id:0,name:"整箱"},{id:1,name:"拼箱"},{id:2,name:"FOB整箱"}],
			search = selectFactory({
                data: {data:resPort},
                id: "portType",
                defaultText:'',
                isSearch: false,
                attrTextModel: function (name, data, current) {
                    var stateData = self.state;
                    stateData.portType = current.name;
                    self.setState(stateData);
                }
            });
	},
	getStartPort: function(portList){
		var self = this;
		// Api.get('serviceTransportCloud.getPort',{"urlParams" :{pageIndex:1,pageSize:100}}, function (resData) {
        //    resDatas = resData.data
        //    console.log(resDatas);
        // });
        var resStartPort = portList.data,
        	searchStartPort = selectFactory({
                data: {data:resStartPort},
                id: "startPort",
                defaultText:'',
                defaultCount: 1000,
                isSearch: false,
                attrTextModel: function (name, data, current) {
                    var stateData = self.state;
                    stateData.startPort = current.name;
                    self.setState(stateData);
                }
            });

	},
	getEndPort: function(portList){
		var self = this;
		var resEndPort = portList.data,
			searchEndPort = selectFactory({
                data: {data:resEndPort},
                id: "endPort",
                defaultText:'',
                defaultCount: 1000,
                isSearch: false,
                attrTextModel: function (name, data, current) {
                    var stateData = self.state;
                    stateData.endPort = current.name;
                    self.setState(stateData);
                }
            });
	},
	getAirportType: function(){
		var self = this;
		var resAirport = [{id:0,name:"拼舱"},{id:1,name:"包板"}],
			search = selectFactory({
                data: {data:resAirport},
                id: "airportType",
                defaultText:'',
                isSearch: false,
                attrTextModel: function (name, data, current) {
                    var stateData = self.state;
                    stateData.airportType = current.name;
                    self.setState(stateData);
                }
            });
	},
	getStartAirport: function(airportList){
		var self = this;
        var resStartAirport = airportList.data,
        	searchStartPort = selectFactory({
                data: {data:resStartAirport},
                id: "startAirport",
                defaultText:'',
                isSearch: false,
                defaultCount: 1000,
                attrTextModel: function (name, data, current) {
                    var stateData = self.state;
                    stateData.startAirport = current.name;
                    self.setState(stateData);
                }
            });

	},
	getEndAirport: function(airportList){
		var self = this;
		var resEndAirport = airportList.data,
			searchEndPort = selectFactory({
                data: {data:resEndAirport},
                id: "endAirport",
                defaultText:'',
                isSearch: false,
                defaultCount: 1000,
                attrTextModel: function (name, data, current) {
                    var stateData = self.state;
                    stateData.endAirport = current.name;
                    self.setState(stateData);
                }
            });
	},
	getCountry: function(){
		var self = this;
		var countrys = [
				{id: 0,name: "埃及开罗市"},
				{id: 1,name: "荷兰蒂尔堡市"},
				{id: 2,name: "巴西八卢韦利市"},
				{id: 3,name: "加拿大温哥华市"},
				{id: 4,name: "美国加州圣地亚哥市"},
				{id: 5,name: "美国纽约州纽约市"},
				{id: 6,name: "中国北京市"},
				{id: 7,name: "中国上海市"},
				{id: 8,name: "中国成都市"},
				{id: 9,name: "泰国清迈市"},
				{id: 10,name: "新加坡新加坡市"},
				{id: 11,name: "马来西亚吉隆坡市"},
				{id: 12,name: "印度尼西亚雅加达市"},
				{id: 13,name: "其他"}
			],
			searchCountry = selectFactory({
                data: {data:countrys},
                id: "country_select",
                defaultText:'',
                isSearch: false,
                attrTextModel: function (name, data, current) {
                    var stateData = self.state;
                    stateData.country = current.name;
                    self.setState(stateData);
                }
            });
	},
	getStorehouse: function(){
		var self = this;
		var storageHouses = [
				{id: 0,name: "标准库"},
				{id: 1,name: "高台库"},
				{id: 2,name: "冷库"},
				{id: 3,name: "立体库"},
				{id: 4,name: "危险品库"},
				{id: 5,name: "保税库"},
				{id: 6,name: "电商库"},
				{id: 7,name: "其他"}
			],
			searchCountry = selectFactory({
                data: {data:storageHouses},
                id: "storagehouse_select",
                defaultText:'',
                isSearch: false,
                attrTextModel: function (name, data, current) {
                    var stateData = self.state;
                    stateData.storeHouse = current.name;
                    self.setState(stateData);
                }
            });
	},
	getUsableArea: function(){
		var self = this;
		var usableAreas = [
				{id: 0,name: "100m²以下"},
				{id: 1,name: "100m²-500m²"},
				{id: 2,name: "500m²-1000m²"},
				{id: 3,name: "1000m²以上"}
			],
			searchCountry = selectFactory({
                data: {data:usableAreas},
                id: "useablearea_select",
                defaultText:'',
                isSearch: false,
                attrTextModel: function (name, data, current) {
                    var stateData = self.state;
                    stateData.usableArea = current.name;
                    self.setState(stateData);
                }
            });
	},
	getPrice: function(){
		var self = this;
		var prices = [
				{id: 0,name: "0.1-0.6元/m²/天"},
				{id: 1,name: "0.6-1元/m²/天"},
				{id: 2,name: "1-1.5元/m²/天"},
				{id: 3,name: "1.5元/m²/天以上"}
			],
			searchCountry = selectFactory({
                data: {data:prices},
                id: "price_select",
                defaultText:'',
                isSearch: false,
                attrTextModel: function (name, data, current) {
                    var stateData = self.state;
                    stateData.price = current.name;
                    self.setState(stateData);
                }
            });
	},
	getOthers: function(){
		var self = this;
		var others = [
				{id: 0,name: "起租期限"},
				{id: 1,name: "附近交通"},
				{id: 2,name: "评定等级"}
			],
			searchCountry = selectFactory({
                data: {data:others},
                id: "others_select",
                defaultText:'',
                isSearch: false,
                attrTextModel: function (name, data, current) {
                    var stateData = self.state;
                    stateData.others = current.name;
                    self.setState(stateData);
                }
            });
	}

}
module.exports = service_transportCloudService;